<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="zh-CN" />
<meta name="Keywords" content="关键词1,关键词2，关键词3,关键词4,……" />
<meta name="Description" content="你网页的简述" />
<meta name="Robots" content="All" />
<meta name="Generator" content="Dreamweaver" />
<title>菜单管理</title>
<link href="<%=path%>/static/css/css.css" rel="stylesheet"
	type="text/css" />
</head>
<script src="https://code.jquery.com/jquery-3.0.0.min.js"></script>
<script language="JavaScript">
	function t() {
		var t = ${not empty requestScope.list ? "false" : "true"};
		if(t==true){
			
		}else{
			var begin = $("#begin").attr("href");
			var next = $("#next").attr("href");
			var pre = $("#pre").attr("href");
			var end = $("#end").attr("href");
			var go = $("#go").attr("action");
			begin = begin + "&list=${requestScope.list}";
			next = next + "&list=${requestScope.list}";
			pre = pre + "&list=${requestScope.list}";
			end = end + "&list=${requestScope.list}";
			go = go + "&list=${requestScope.list}";
			$("#begin").attr("href",begin);
			$("#next").attr("href",next);
			$("#pre").attr("href",pre);
			$("#end").attr("href",end);
			$("#go").attr("action",go);
		}
			
	}
	
</script>
<body onload="t()">
	<h3 id="subTitle">入库报销－按供应商</h3>

	<form action="<%=path%>/payMentServlet?status=query&currentPage=0" method="post" name="form2" id="form2">
		<table width="90%" border="0" align="center" cellpadding="0"
			cellspacing="0" class="table2">

			<tr>
				<td nowrap="nowrap">按供应商名查询：</td>
				<td nowrap="nowrap"><input type="text" name="supplier" /> <input
					name="Submit" type="submit" class="buttonInp" value="查 询" /></td>
			</tr>
			</form>

			<table width="90%" border="0" align="center" cellpadding="0"
				cellspacing="0" class="table">

				<form action="<%=path%>/payMentServlet?status=pay" method="post" name="form1" id="form1">
					<tr>
						<th width="10%" align="center" nowrap="nowrap" class="title2">操作</th>
						<th width="15%" align="center" nowrap="nowrap" class="title2">书籍</th>

						<th width="13%" align="center" nowrap="nowrap" class="title2">数目</th>
						<th width="24%" align="center" nowrap="nowrap" class="title2">供应商</th>
						<th width="18%" align="center" nowrap="nowrap" class="title2">入库时间</th>
						<th width="20%" align="15%" nowrap="nowrap" class="title2">总金额</th>
					</tr>

					<c:forEach var="pay"
						items="${requestScope.pageResults.getResults() }" varStatus="id">
						<tr class="within2bg">
							<td align="center" class="font_hilite"><input
								name="checkbox" type="checkbox" value="${pay.getId()}" /></td>
							<td align="center">${pay.getStockReceive().getTextBook().getName()}</td>
							<td align="center">${pay.getStockReceive().getAmount()}</td>
							<td align="center">${pay.getStockReceive().getSupplier().getName()}</td>
							<td align="center"><span class="font_hilite">${pay.getStockReceive().getDateTime()}</span></td>
							<td align="center" class="font_hilite">${pay.getStockReceive().getAmount() * pay.getStockReceive().getTextBook().getPrice()}</td>
							</tr>
					</c:forEach>

					<c:if test="${requestScope.pageResults.getPageCount()==0}">
						<tr align="center" class="within2bg">
							<td colspan="7" class="no_note">没有符合条件的记录</td>
						</tr>
					</c:if>
					<td colspan="6" align="center">
						<input name="textfield" type="submit" class="input2" value="报销" />
						&nbsp; &nbsp; &nbsp; 
						<input name="textfield" type="reset" class="input2" value="重置" />
					</td>

				</form>

			</table>
			<table width="90%" border="0" align="center" cellpadding="3"
				cellspacing="0" id="page">
				<tr>
					<td align="right">共有记录
						${requestScope.pageResults.getTotalCount()}条 第
						${requestScope.pageResults.getCurrentPage()}/
						${requestScope.pageResults.getPageCount()}页 <a
						href="<%=path%>/payMentServlet?status=${requestScope.status}&currentPage=0"
						id="begin">首页</a> <a
						href="<%=path%>/payMentServlet?status=${requestScope.status}&currentPage=${requestScope.pageResults.getCurrentPage()-1}"
						id="pre">上一页</a> <a
						href="<%=path%>/payMentServlet?status=${requestScope.status}&currentPage=${requestScope.pageResults.getPageNo()}"
						id="next">下一页</a> <a
						href="<%=path%>/payMentServlet?status=${requestScope.status}&currentPage=${requestScope.pageResults.getPageCount()}"
						id="end">末页</a>

						<form
							action="<%=path%>/payMentServlet?status=${requestScope.status}"
							method="post" id="go">
							到 <input name="goalpage" type="text" class="input2" size="5"
								id="goalpage" /> 页 <input name="Submit6" type="submit"
								class="buttonInp" value="GO" />
						</form>
					</td>
				</tr>
			</table>
</body>
</html>